package com.java.yz.day14.Join;

public class JoinThreadDemo1 {
    public static void main(String[] args) {
        MyJoinThread t1 = new MyJoinThread();  //Thread-0
        MyJoinThread t2 = new MyJoinThread();  //Thread-1
        MyJoinThread t3 = new MyJoinThread();  //Thread-2
        //放在这里好像没有什么效果
//        try {
//            t1.join();
//        } catch (InterruptedException e) {
//            e.printStackTrace();
//        }


        t1.start();
        try {
            t1.join();
        } catch (InterruptedException e) {
            e.printStackTrace();
        }
        //放在这里会让t1进程限先执行完
        //后面在执行t2,t3
        t2.start();
        t3.start();
    }
}
